SetAxisVelocity

設定軸的目標速度。此函式僅可在直接扭速度 (Direct Velocity) 控制模式中使用,該模式中此函式為設定軸目標速度的唯一函式。

語法

KsError SetAxisVelocity(
     int Index,
     double Velocity
);

參數

Index:軸的索引。索引以零為起點;別名將影響此參數。

Velocity:每秒軸速度(使用者單位)。

回傳值

如果此函式執行成功,會回傳 errNoError,否則會傳回錯誤碼。如需更多有關錯誤碼的資訊,請參閱 KsError 清單。

備註

使用直接速度 (Direct Velocity) 模式可依據需要或自訂的插補在每週期設定軸的速度。

範例

複製
KsError nRet = SetAxisVelocity(0, 100);

使用需求

  RT Win32
最低支援版本 4.0 4.0
標頭檔 ksmotion.h ksmotion.h
程式庫 KsApi_Rtss.lib KsApi.lib

參見

GetAxisVelocity

SetAxisPosition

SetAxisTorque